<style>
.setimg{
	margin:-2px 5px 0 0 
}
</style>
<div class="row-fluid">
	<a style="border:1px solid #ccc" class="block-heading" data-toggle="collapse">列表数据</a>
    <div class="well">
	    <div class="btn-toolbar">
		    <form>
		    	<label style="display: inline;">用户原姓名：</label><input class="input input-medium" type="text" name="cust_name" value="<?=I('get.cust_name')?>" />
		    	<label style="display: inline;margin-left:10px">原手机号码：</label><input class="input input-medium" type="text" name="cust_mobile" value="<?=I('get.cust_mobile')?>" />
		    	<input type="hidden" value="<?=I('get.res')?>" name="res" />
		    	<button class="btn btn-info" style="margin:-9px 0 0 15px"><i class="icon-search"></i> 搜索</button>

		    </form>
		</div>
		<hr>
		<table class="table">
		      <thead>
		        <tr>
		          <th style="text-align:center;width:100px">序号id</th>
					<th style="text-align:center;width:180px">修改种类</th>
		          <th style="text-align:center;width:170px">原信息</th>
		          <th style="text-align:center;width:180px">新信息</th>
		          <th style="text-align:center;width:180px">用户资料</th>
		          <th style="text-align:center;width:140px">需求时间</th>
		          <th style="text-align:center;width:140px">状态</th>
		      	  <th style="text-align:center;width:130px">操作</th>
		        </tr>
		      </thead>
		      <tbody>
		      	<?php if($getData){foreach($getData AS $key=>$val){ ?>
		        <tr> 
		          <td style="text-align:center;vertical-align:middle;"><?=$val['id']?></td>
		          <td style="text-align:center;vertical-align:middle;"><?=$val['type'] ? '改手机号': '改姓名'?></td>
		          <td style="text-align:center;vertical-align:middle;"><?=$val['former'] ?></td>
		          <td style="text-align:center;vertical-align:middle;">
                      <?=$val['after'] ?>
		          </td>
                    <td style="text-align:center;vertical-align:middle;">
                        <?= $val['type'] == 0 ? $val['userinfo']['cust_mobile'] : $val['userinfo']['cust_realname']?>
                    </td>
		          <td style="text-align:center;vertical-align:middle;"><?=date('Y-m-d H:i',$val['add_at'])?></td>
		          <td style="text-align:center;vertical-align:middle;"><?=$val['status'] > 0 ? '审核通过' : (!$val['status'] ? '待审核' : '已作废')?></td>

		          <td style="text-align:center;vertical-align:middle;">
                      <?php if($val['status']){?>
                      <a class="ifrm btn btn-info" href="javascript:void(0)" data-url="/user/dodemand" data-width="680" data-height="430" style="padding: 0px 4px;" data-title="查看信息" data-params="id/<?=$val['id']?>"><i class="icon-search"></i></a>
                      <?php }else{?>
                      <a class="ifrm btn btn-info" href="javascript:void(0)" data-url="/user/dodemand" style="padding: 0px 4px;" data-width="860" data-height="630" data-title="修改信息" data-params="id/<?=$val['id']?>"><i class="icon-pencil"></i></a>
                      <?php }?>
				 </td>
		        </tr>
		        <?php }}else{?>
		        	<tr><td style="text-align:center" colspan=8>暂无数据</td></tr>
		        <?php }?>
		      </tbody>
		   </table>
		   <span style="float:right;margin-top:-44px"><?=$page?></span>
	</div>
</div>
<script>
$(function(){
	$('#setApply').change(function(){
		if($(this).val() != '0'){
			var strs = <?=json_encode($jsonArr)?>;
			var html = '<select name="city" id="appCity" style="width:125px;margin-left:5px">';
			for(var i=0;i<strs[$(this).val()].length;i++){
				html += '<option value="'+strs[$(this).val()][i]['city']+'">'+strs[$(this).val()][i]['city']+'('+strs[$(this).val()][i]['cnt']+')</option>';
			}
			html += '</select>';
			$('#appCity').remove();
			$(html).insertAfter($('#setApply'));
			<?php if(I('get.city')){?>
			$('#appCity').val('<?=I('get.city')?>');
			<?php }?>
		}
	}).trigger('change');
	$('.decate').live('click',function(){
		if(!window.confirm('确认'+$(this).attr('title')+'吗 ?')){
			return false;
		}
		window.location = $(this).attr('href');
	});
	$('.setTag').click(function(){
		if(!window.confirm('确认'+$(this).attr('title')+'吗 ?')){
			return false;
		}
		window.location = $(this).attr('href');
	});
	$('.lineCount').click(function(){
        art.dialog.open('/user/level/ifm/1/',
        {
            id: 'SETCHOSEID',
            width: '100%',
            height: '100%',
            left: '0%',
            top: '0%',
            fixed: true,
            resize: false,
            drag: false,
            title: '用户等级'
        });
    });
})
</script>